package edu.uhcl.team_drone.drone;

import com.badlogic.gdx.math.Vector3;


// COMPONENTS
// Input / Movement / Camera / 
public class Drone {
    
    protected float dx, dy, dz;

    protected Vector3 position = new Vector3(0, 0, 0); // Current Position
    protected Vector3 up = Vector3.Y;    // upwards from the current position
    protected Vector3 direction = new Vector3(1, 0, 0); // forward direction from current position  
    protected Vector3 right = direction.cpy().crs(up).nor();

    public MovementComponent movementCmp;
    public InputComponent inputCmp;
    public StabilizerComponent stabilizerCmp;

    public Drone(Vector3 startPosition) {
        movementCmp = new MovementComponent(this, startPosition);
        inputCmp = new InputComponent(this, movementCmp); 
        stabilizerCmp = new StabilizerComponent(this);
    }

    public void update(float deltaTime) {
        inputCmp.update(deltaTime);
        movementCmp.update(deltaTime);        
        stabilizerCmp.update(deltaTime);
    }
    
    public Vector3 getPosition() {
        return position;
    }

    public Vector3 getDirection() {
        return direction;
    }

    public Vector3 getUp() {
        return up;
    }

    

}
